Adwaita: make links on selected bg visible...
authorLapo Calamandrei <calamandrei@gmail.com>
Mon, 1 Sep 2014 17:10:50 +0000 (19:10 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Mon, 1 Sep 2014 17:10:50 +0000 (19:10 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 69015b9bdf2f54407f4fca2f3b37e8103e5dca2e..5ff5b7d9c13aea846054c01571a938a414c38607 100644 (file)
@@ -694,26 +694,26 @@ GtkColorButton.button {
   color: $selected_bg_color; //FIXME use a proper color
   &:hover, &:active, &:visited {
     color: mix($fg_color, $selected_bg_color, 40%); //FIXME same here
+    *:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); }
   }
-  &:backdrop, &:backdrop:hover {
+  &:backdrop, &:backdrop:hover, &:backdrop:hover:selected {
     color: $selected_bg_color;
   }
+  &:selected, *:selected & { color: $selected_fg_color; }
 }
 
 .button:link, .button:visited {
-  color: $selected_bg_color; //FIXME use a proper color
   @extend %undecorated_button;
+  @extend *:link;
   text-shadow: none;
   &:hover, &:active, &:checked {
     @extend %undecorated_button;
-    color: mix($fg_color, $selected_bg_color, 40%); //FIXME same here
     text-shadow: none;
   }
   &:backdrop {
     @extend %undecorated_button; //This shouldn't be needed but avoids
                                  //a weird transition which for some reason
                                  //makes borders blink on hover
-    color: $selected_bg_color; //FIXME use a proper color
   }
 }
 
@@ -998,6 +998,7 @@ GtkComboBox {
       background-image: linear-gradient(to bottom, $selected_bg_color);
       box-shadow: inset 0 1px mix($top_hilight,$selected_bg_color, 60%);
     }
+    .subtitle:link { @extend *:link:selected;  }
     .button {
       @include button(normal, $selected_bg_color, $selected_fg_color, noedge);
       &:hover { @include button(hover, $selected_bg_color, $selected_fg_color,
index fba49360dca2abb0a4e1b6e34b3d7f0331c25b03..ac2a86c4c97c5c28bd219fb356faae4fe2ed231a 100644 (file)
@@ -939,21 +939,23 @@ GtkColorButton.button {
 /*********
  * Links *
  *********/
-*:link {
+*:link, .button:link, .button:visited {
   color: #215d9c; }
-  *:link:hover, *:link:active, *:link:visited {
+  *:link:hover, .button:hover:link, .button:hover:visited, *:link:active, .button:active:link, .button:active:visited, *:link:visited, .button:visited {
     color: #7397bc; }
-  *:link:backdrop, *:link:backdrop:hover {
+    *:selected *:link:hover, *:selected .button:hover:link, *:selected .button:hover:visited, *:selected *:link:active, *:selected .button:active:link, *:selected .button:active:visited, *:selected *:link:visited, *:selected .button:visited {
+      color: #d2deeb; }
+  *:link:backdrop, .button:backdrop:link, .button:backdrop:visited, *:link:backdrop:hover, .button:backdrop:hover:link, .button:backdrop:hover:visited, *:link:backdrop:hover:selected, .button:backdrop:hover:selected:link, .button:backdrop:hover:selected:visited, .titlebar.selection-mode .subtitle:backdrop:hover:link, GtkCalendar.selection-mode.header .subtitle:backdrop:hover:link,
+  .header-bar.selection-mode .subtitle:backdrop:hover:link {
     color: #215d9c; }
+  *:link:selected, .button:selected:link, .button:selected:visited, .titlebar.selection-mode .subtitle:link, GtkCalendar.selection-mode.header .subtitle:link,
+  .header-bar.selection-mode .subtitle:link, *:selected *:link, *:selected .button:link, *:selected .button:visited {
+    color: #ffffff; }
 
 .button:link, .button:visited {
-  color: #215d9c;
   text-shadow: none; }
   .button:link:hover, .button:link:active, .button:link:checked, .button:visited:hover, .button:visited:active, .button:visited:checked {
-    color: #7397bc;
     text-shadow: none; }
-  .button:link:backdrop, .button:visited:backdrop {
-    color: #215d9c; }
 
 /*****************
  * GtkSpinButton *
index 4f35d4990f08198c11cad49db3610acbd8217743..e276198156a9d15cd8556370765fbbb4a6d1e4ee 100644 (file)
@@ -931,21 +931,23 @@ GtkColorButton.button {
 /*********
  * Links *
  *********/
-*:link {
+*:link, .button:link, .button:visited {
   color: #4a90d9; }
-  *:link:hover, *:link:active, *:link:visited {
+  *:link:hover, .button:hover:link, .button:hover:visited, *:link:active, .button:active:link, .button:active:visited, *:link:visited, .button:visited {
     color: #3e6b97; }
-  *:link:backdrop, *:link:backdrop:hover {
+    *:selected *:link:hover, *:selected .button:hover:link, *:selected .button:hover:visited, *:selected *:link:active, *:selected .button:active:link, *:selected .button:active:visited, *:selected *:link:visited, *:selected .button:visited {
+      color: #dae8f7; }
+  *:link:backdrop, .button:backdrop:link, .button:backdrop:visited, *:link:backdrop:hover, .button:backdrop:hover:link, .button:backdrop:hover:visited, *:link:backdrop:hover:selected, .button:backdrop:hover:selected:link, .button:backdrop:hover:selected:visited, .titlebar.selection-mode .subtitle:backdrop:hover:link, GtkCalendar.selection-mode.header .subtitle:backdrop:hover:link,
+  .header-bar.selection-mode .subtitle:backdrop:hover:link {
     color: #4a90d9; }
+  *:link:selected, .button:selected:link, .button:selected:visited, .titlebar.selection-mode .subtitle:link, GtkCalendar.selection-mode.header .subtitle:link,
+  .header-bar.selection-mode .subtitle:link, *:selected *:link, *:selected .button:link, *:selected .button:visited {
+    color: #ffffff; }
 
 .button:link, .button:visited {
-  color: #4a90d9;
   text-shadow: none; }
   .button:link:hover, .button:link:active, .button:link:checked, .button:visited:hover, .button:visited:active, .button:visited:checked {
-    color: #3e6b97;
     text-shadow: none; }
-  .button:link:backdrop, .button:visited:backdrop {
-    color: #4a90d9; }
 
 /*****************
  * GtkSpinButton *